<!-- 模板抽屉 -->
<template>
<com-drawer class="tmp-wp" v-model="visible" title="模板抽屉">
  
  这是模板抽屉

  <template slot="footer">
    <el-button size="small" @click="visible = false">取 消</el-button>
    <el-button size="small" @click="submit()" :loading="btnLoading">{{ btnLoading ? '提交中 ...' : '仅保存' }}</el-button>
    <el-button size="small" type="primary" @click="submit()" :loading="btnLoading">{{ btnLoading ? '提交中 ...' : '保存并关闭' }}</el-button>
  </template>
</com-drawer>
</template>
<script>

import {role} from "@/config/api.js";

export default {
  data () {
    return {
      visible: false,
      loading: false,
      btnLoading: false,

      detail: null, // 当前详情

    }
  },
  methods: {
    open (detail) {
      this.detail = detail;

      this.visible = true;
      this.loading = true;
    },

    submit () {
      this.visible = false;
    },

  }
}
</script>
<style lang="scss" scoped>
.tmp-wp {
  
}
</style>
